Skip to content

Manchester | 26-ITP-Jan | Ahmed Elmahmoudi | Sprint 2 | Form-Controls#1177

Open
Alaterry8 wants to merge 12 commits intoCodeYourFuture:mainfrom
Alaterry8:Form-Controls
Open

Manchester | 26-ITP-Jan | Ahmed Elmahmoudi | Sprint 2 | Form-Controls#1177
Alaterry8 wants to merge 12 commits intoCodeYourFuture:mainfrom
Alaterry8:Form-Controls

Conversation

@Alaterry8
Copy link

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Within a form, I added a name field with minimum 2 characters length requirement. I added an email field. I added a set of 3 colours to select from. I added 6 radio options for Size options.

@netlify
Copy link

netlify bot commented Feb 14, 2026

Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit 64112a7
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/699379e4c8381a0008b31cb7
😎 Deploy Preview https://deploy-preview-1177--cyf-onboarding-module.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
2 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 86 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@Alaterry8 Alaterry8 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 14, 2026

</P>


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we submit the result of the form to the server? Do we need a special control for it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have addressed this issue by adding a button at the end. Thank you for pointing that out :D


<br> <br>
<label for="colour"> T-shirt colour:</label>
<select id="colour" name="T-shirt colour">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, we must require the user to actively select colour. Therefore initial option should be empty and we must demand the choise.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed this by adding an empty option value, and made it required to choose a colour. Thanks!


<br> <br>
<label for="XS"> XS</label>
<input type="radio" id="XS" name="Size">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we make sure that user selected t-shirt size? Currently I may avoid selecting any.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this by making one option required. Cheers!


<br> <br>
<label for="S"> S</label>
<input type="radio" id="S" name="Size">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a look into each radio button. Which value will server receive when the appropriate radio button is selected? How will it distinguish one radio button from another?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added the values for each size.

</select>

<br>
<P> Size:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p tag is used typically for paragraph of text. Is there a tag which allows to group controls together? Is there a way to have a legend annotating the control appropriately?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I made sure to use fieldset and legend so that the option are grouped neatly. Thanks!

@@ -1,4 +1,4 @@
<!DOCTYPE html>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what was the reason to change from DOCTYPE to doctype?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that was done automatically when I added the Prettier formatting extension.

try writing out the requirements first as comments
this will also help you fill in your PR message later-->
<label for="name"> Name: </label>
<input type="text" id="name" name="Name" minlength="2" required>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The convention for naming elements (i.e' name) is lowercase

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so the only thing that can be capitalised is what goes between the label tags?


<br> <br>
<label for="colour"> T-shirt colour:</label>
<select id="colour" name="T-shirt colour">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the convention for name is to avoid usage spaces. Use underscore or dash instead

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted! fixed it. Thanks for all the feedback ;D

@SlideGauge SlideGauge added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Feb 15, 2026
@Alaterry8 Alaterry8 added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants